import React, { Component } from 'react'

import RouteView from '../../router/RouteView'

import { RouterList } from '../../utils/types'

import { NavLink } from 'react-router-dom'
interface Props extends RouterList {

}
// interface State {

// }

export default class Article extends Component<Props> {
    state = {}

    render() {
        let { routeList, navLink } = this.props
        console.log(this.props);
        return (
            <div>
                文章
                <div>
                    {
                        navLink ? navLink.map((item, index) => {
                            return <NavLink
                                key={index}
                                to={item.path as string}
                            >{item.name}</NavLink>
                        }) : null
                    }
                    <RouteView routeList={routeList}></RouteView>
                </div>
            </div>
        )
    }
}
